package com.uniledger.test.model;

public class HttpResult<T> extends BaseHttpResult<T> {
    public int code;
    public String msg;
    public T data;

    @Override
    public String toString() {
        return "HttpResult{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }

    @Override
    public boolean isSuccess() {
        return code == 0;
    }

    @Override
    public boolean isTokenInvalid() {
        return false;
    }

    @Override
    public boolean isShowToast() {
        return false;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public T getData() {
        return data;
    }
}
